<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>帐户列表</title>

<%--
<script type="text/javascript">

Ext.onReady(function(){


	var grid = new Ext.ux.grid.TableGrid("res-table", {
        stripeRows: true // stripe alternate rows
    });
   grid.render();	
});

</script>
--%>

</head>
<body>
<div class="main">
<div class="main_title">你当前的位置：账户管理-账户列表</div>
<s:form id="s_user_form" namespace="/user" action="user!listUserPage.action">
<s:hidden name="pageSize" id="pageSize"/>
<table  cellpadding="1" cellspacing="1" class="search">
      <tr class="listr2">
        <td align="right" class="listr6">账户名</td>
        <td align="left" class="listr5"><input type="text" name="user.name" class="searchInput" /></td>        
      </tr>
      <tr class="listr2">
        <td align="right">&nbsp;</td>
        <td align="left" class="listr5"><input type="submit" name="Submit" value="查询" class="btn"  onmouseover="this.className='btn_hover'" onmouseout="this.className='btn'" />
          <input type="reset" name="Submit2" value="重置" class="btn"  onmouseover="this.className='btn_hover'" onmouseout="this.className='btn'" /></td>
      </tr>
    </table>
</s:form>
<div class="botton">
	  <s:form namespace="/user" action="addOrUpdate!input.action"><input name="" type="submit" value="新增" class="add" onmouseover="this.className='add_hover'" onmouseout="this.className='add'"  /></s:form>
	  <%--
	  <input name="" type="button" value="修改" class="mudify" onmouseover="this.className='mudify_hover'" onmouseout="this.className='mudify'"  />
	  <input name="" type="button" value="删除" class="delete" onmouseover="this.className='delete_hover'" onmouseout="this.className='delete'" />
	  <input name="" type="button" value="校验" class="check" onmouseover="this.className='check_hover'" onmouseout="this.className='check'" />
	  <input name="" type="button" value="浏览" class="read" onmouseover="this.className='read_hover'" onmouseout="this.className='read'" />
	   --%>
</div>
<table id="res-table" cellpadding="1" cellspacing="1" class="tablelist" >
  <tr class="toptitle">
    <td>账户名</td>
	<td>账户类别</td>
	<td>是否启用</td>
	<td>是否锁定</td>
	<td>是否过期</td>
	<td>密码是否过期</td>
	<td>最后登录时间</td>
	<td>最后登录IP</td>
	<td>最后注销时间</td>
	<td>操作</td>
  </tr>
	<tbody>
	<s:iterator value="page.res" status="status">
	<s:if test="#status.even">
	 <tr class="listr1" onmouseover="this.className='listr3'" onmouseout="this.className='listr1'">
	</s:if>
	<s:else>
	 <tr class="listr2" onmouseover="this.className='listr3'" onmouseout="this.className='listr2'">
	</s:else>
		<td>&nbsp;<s:property value="name" /></td>
		<td>&nbsp;<s:property value="%{valueUserType(userType)}" /></td>
		<td>&nbsp;
			<s:if test="enabled">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:if test="locked">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:if test="exipred">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:if test="passwordexipred">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:date format="yyyy-MM-dd HH:mm" name="lastloginTime"/>
		</td>
		<td>&nbsp;
			<s:property value="loginIp"/>
		</td>
		<td>&nbsp;
			<s:date format="yyyy-MM-dd HH:mm" name="lastlogoutTime"/>
		</td>
		<td>&nbsp;
			<s:url id="modifyUrl" namespace="/user"
				action="addOrUpdate!input">
				<s:param name="user.id">
					<s:property value="id" />
				</s:param>
			</s:url>
			<s:url id="viewUrl" namespace="/user"
				action="user!viewUser">
				<s:param name="id">
					<s:property value="id" />
				</s:param>
			</s:url>
			<s:url id="deleteUrl" namespace="/user"
						action="user!deleteUser">
						<s:param name="user.id">
							<s:property value="id" />
						</s:param>
			</s:url>

			<s:url id="addrole" namespace="/user"
				action="user!addRole">
				<s:param name="id">
					<s:property value="id" />
				</s:param>
			</s:url>

			<s:a href='%{modifyUrl}'>修改</s:a>
			<s:a href='%{viewUrl}'>查看</s:a>
			<s:a href='%{deleteUrl}'>删除</s:a>
			<s:a href='%{addrole}' >分配角色</s:a>
		</td>
	</tr>
</s:iterator>
	</tbody>
</table>
<table class="tablelist" >
<s:set  var="totle" scope="request" value="page.count"/>
<s:set  var="pageSize" scope="request" value="pageSize"/>
<%
	Integer count = (Integer) request.getAttribute("totle");
	Integer pageSize = (Integer) request.getAttribute("pageSize");
%>
		
	<tr>
	<td class="listr4" align="left" colspan="14">
		
		<pg:pager  url="user!listUserPage.action" items='<%=count.intValue()%>'
			maxPageItems='<%=pageSize%>' export="currentPage=pageNumber">
			<pg:param name="user.name" />
			<pg:param name="pageSize" />
			<pg:index export="pages">
				<table>
				<tr>
				<td>
					当前<b class="fontred"><%= currentPage%></b>/<%=pages%>页&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td>
				<pg:first>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">首页</a>
				</pg:first>
				</td>
				<td>	
				<pg:prev>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">上一页</a>
				</pg:prev>
				</td>
				<td>
				<pg:pages>
					<%
						if (currentPage == pageNumber) {
					%>
					<font color="red"><%=pageNumber%></font>
					<%
						} else {
					%>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>"><%=pageNumber%></a>
					<%
						}
					%>
				</pg:pages>
				</td>
				<td>
				<pg:next>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">下一页</a>
				</pg:next>
				</td>
				<td>
				<pg:last>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">末页</a>&nbsp;&nbsp;&nbsp;&nbsp;
				</pg:last>
				</td>
				
				<td>
					&nbsp;
				</td>
				<td style="padding-left: 10px;">
					每页显示的记录数
				</td>
				<td>
					<input type="text" class="PageInput" value="<%=pageSize %>" onchange="Ext.get('pageSize').dom.value=this.value;Ext.get('s_user_form').dom.submit();"/>
				</td>
				<td>
					条
				</td>
				<td>
					&nbsp;
				</td>
				</tr>
				</table>
			</pg:index>

		</pg:pager>
		</td>
	</tr>
</table>
</div>

<%--

<div class="tleft"></div>
<div class="tright"></div>
<div class="tbg">搜索</div>
<s:form id="s_user_form" namespace="/user" action="user!listUserPage.action">
<s:hidden name="pageSize" id="pageSize"/>
<table cellpadding="1" cellspacing="1"  class="tableInput">
	<tr>
		<td class="tableHeader2">账户名</td>
		<td class="tableHeader3" ><div class="input_div"><s:textfield name="user.name" cssClass="inputText"/></div></td>
	</tr>
</table>
<div class="tableHeader4"><s:submit  cssClass="btn_Text2" value="查 询" />
          <input name="Submit9" type="reset" class="btn_Text2" value="重 置" /></div>
</s:form>

<div class="tleft"></div>
<div class="tright"></div>
<div class="tbg">账户列表</div>

<table  id="res-table"  cellspacing="1" cellpadding="1" class="tablelist">
	<thead>
		<th class="toptitle">账户名</th>
		<th class="toptitle">账户类别</th>
		<th class="toptitle">是否启用</th>
		<th class="toptitle">是否锁定</th>
		<th class="toptitle">是否过期</th>
		<th class="toptitle">密码是否过期</th>
		<th class="toptitle">最后登录时间</th>
		<th class="toptitle">最后登录IP</th>
		<th class="toptitle">最后注销时间</th>
		<th class="toptitle">操作</th>
	</thead>
	<tbody>
	<s:iterator value="page.res" status="status">
	<s:if test="#status.even">
	 <tr class="listr1" onmouseover="this.className='listr3'" onmouseout="this.className='listr1'">
	</s:if>
	<s:else>
	 <tr class="listr2" onmouseover="this.className='listr3'" onmouseout="this.className='listr2'">
	</s:else>
		<td>&nbsp;<s:property value="name" /></td>
		<td>&nbsp;<s:property value="%{valueUserType(userType)}" /></td>
		<td>&nbsp;
			<s:if test="enabled">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:if test="locked">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:if test="exipred">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:if test="passwordexipred">是</s:if>
			<s:else>否</s:else>
		</td>
		<td>&nbsp;
			<s:date name="lastloginTime"/>
		</td>
		<td>&nbsp;
			<s:property value="loginIp"/>
		</td>
		<td>&nbsp;
			<s:date name="lastlogoutTime"/>
		</td>
		<td>&nbsp;
			<s:url id="modifyUrl" namespace="/user"
				action="addOrUpdate!input">
				<s:param name="user.id">
					<s:property value="id" />
				</s:param>
			</s:url>
			<s:url id="viewUrl" namespace="/user"
				action="user!viewUser">
				<s:param name="id">
					<s:property value="id" />
				</s:param>
			</s:url>
			<s:url id="deleteUrl" namespace="/user"
						action="user!deleteUser">
						<s:param name="user.id">
							<s:property value="id" />
						</s:param>
			</s:url>

			<s:url id="addrole" namespace="/user"
				action="user!addRole">
				<s:param name="id">
					<s:property value="id" />
				</s:param>
			</s:url>

			<s:a href='%{modifyUrl}'>修改</s:a>
			<s:a href='%{viewUrl}'>查看</s:a>
			<s:a href='%{deleteUrl}'>删除</s:a>
			<s:a href='%{addrole}' >分配角色</s:a>
		</td>
	</tr>
</s:iterator>
	</tbody>
	</table>
	<table>
<s:set  var="totle" scope="request" value="page.count"/>
<s:set  var="pageSize" scope="request" value="pageSize"/>
<%
	Integer count = (Integer) request.getAttribute("totle");
	Integer pageSize = (Integer) request.getAttribute("pageSize");
%>
		
	<tr>
	<td class="listr4" colspan="14">
		
		<pg:pager  url="user!listUserPage.action" items='<%=count.intValue()%>'
			maxPageItems='<%=pageSize%>' export="currentPage=pageNumber">
			<pg:param name="user.name" />
			<pg:param name="pageSize" />
			<pg:index export="pages">
				<table>
				<tr>
				<td>
					当前<b class="fontred"><%= currentPage%></b>/<%=pages%>页&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td>
				<pg:first>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">首页</a>
				</pg:first>
				</td>
				<td>	
				<pg:prev>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">上一页</a>
				</pg:prev>
				</td>
				<td>
				<pg:pages>
					<%
						if (currentPage == pageNumber) {
					%>
					<font color="red"><%=pageNumber%></font>
					<%
						} else {
					%>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>"><%=pageNumber%></a>
					<%
						}
					%>
				</pg:pages>
				</td>
				<td>
				<pg:next>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">下一页</a>
				</pg:next>
				</td>
				<td>
				<pg:last>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">末页</a>&nbsp;&nbsp;&nbsp;&nbsp;
				</pg:last>
				</td>
				
				<td>
					&nbsp;
				</td>
				<td style="padding-left: 10px;">
					每页显示的记录数
				</td>
				<td>
					<input type="text" class="inputDftText" value="<%=pageSize %>" onchange="Ext.get('pageSize').dom.value=this.value;Ext.get('s_user_form').dom.submit();"/>
				</td>
				<td>
					条
				</td>
				<td>
					&nbsp;
				</td>
				</tr>
				</table>
			</pg:index>

		</pg:pager>
		</td>
	</tr>
</table> 	
<div class="tableHeader4">
	<s:form namespace="/user" action="addOrUpdate!input.action">
		<input type="submit" value="添加" class="btn_Text2"></input>
	</s:form>
</div>	

--%>
</body>
</html>